import server from '@/config/server'

function post(path, auth = true, config = true) {
  return server.api().post(path).auth(auth).config(config)
}
function get(path, auth = true, config = true) {
  return server.api().get(path).auth(auth).config(config)
}

const api = {
  pageList: post('/dt-user/poster/list'), //顾问海报分页列表
  exportList: post('/dt-user/poster/listExport').tag('downloadCenter'), //顾问海报列表导出
  delById: get('/dt-user/poster/delById') //删除顾问海报
}

function getListData(params) {
  return api.pageList.fetch(params)
}

function exportListData(params) {
  return api.exportList.fetch(params)
}

function delById(params) {
  return api.delById.fetch(params)
}
export default {
  getListData,
  exportListData,
  delById
}
